## Ansell 2008 IO

library(foreign) 
library(Amelia)

## Load original dataset
a2008 <- read.dta("A2008 IO Rep Data.dta")
head(a2008)
dim(a2008)

# Drop ID and other index vars
a2008$country <- a2008$code <- a2008$id <- a2008$numcode<- a2008$aclpcode <- a2008$ccode1 <- a2008$name <- a2008$shcode <- a2008$opprurl <- a2008$polconcountrycode <- a2008$type <- a2008$ssno <- a2008$marker <- a2008$syr <- a2008$tyr <- a2008$hyr <- a2008$pyr <- a2008$year5 <- a2008$yearbasic <- a2008$l5pyr <-a2008$l5syr <-a2008$l5hyr <-a2008$l5tyr <- NULL

## Drop vars with no variation
a2008$nonchief <- a2008$govme <- a2008$govme2 <- a2008$oppme2 <- a2008$opprel <- a2008$oppme3 <- a2008$opprlc <- a2008$oppme <- a2008$govrel3 <- a2008$govrlc3 <- a2008$govme3 <- a2008$govrlc2 <- a2008$govme2 <- a2008$govrlc <-  a2008$govrel2 <- a2008$thresh <- a2008$execme <-a2008$execrlc <- a2008$l5reppri <- NULL

## Drop derived dummy vars
a2008$demdummy <- a2008$nineties <- a2008$rdum1 <- a2008$rdum2 <- a2008$rdum3 <- a2008$rdum4 <- a2008$rdum5 <- a2008$rdum6 <- a2008$rdum7 <- a2008$rdum8 <- a2008$rdum9 <- a2008$rdum10 <- a2008$seventies <- a2008$eighties <- a2008$sixties <- a2008$y1 <-a2008$y2 <-a2008$y3 <-a2008$y4 <-a2008$y5 <-a2008$y6 <-a2008$y7 <-a2008$y8 <-a2008$y9 <-a2008$y10 <-a2008$y11 <-a2008$y12 <-a2008$y13 <-a2008$y14 <-a2008$y15 <-a2008$y16 <-a2008$y17 <-a2008$y18 <-a2008$y19 <-a2008$y20 <-a2008$y21 <-a2008$y22 <-a2008$y23 <-a2008$y24 <-a2008$y25 <-a2008$y26 <-a2008$y27 <-a2008$y28 <-a2008$y29 <-a2008$y30 <-a2008$y31 <-a2008$y32 <-a2008$y33 <-a2008$y34 <-a2008$y35 <-a2008$y36 <-a2008$y37 <-a2008$y38 <-a2008$y39 <-a2008$y40 <-a2008$y41 <-a2008$y42 <-a2008$y43 <- a2008$africa <- a2008$casia <- a2008$weurope <- a2008$namerica <- a2008$samerica <- a2008$nafrme <- a2008$easia <- a2008$sasia <- a2008$eeurope <- a2008$oceania <- NULL

## Drop calculated parameters
a2008$flag4126 <- a2008$flagc <- a2008$flage <- a2008$flagi <- a2008$flagi2 <- a2008$flagr <- a2008$flagr2k <- a2008$flagr96 <- a2008$BCFE1965 <- a2008$BCFE1975 <- a2008$BCFE1985 <- a2008$BCFE1995 <- a2008$BCFE25000 <- a2008$BCFEargent <- a2008$BCFEaustral <- a2008$BCFEaustria <- a2008$BCFEbelgium <- a2008$BCFEbenin <- a2008$BCFEbolivia <- a2008$BCFEbrazil <- a2008$BCFEburkf <- a2008$BCFEcanada <- a2008$BCFEdevel <- a2008$bopgdpsd <- a2008$bopvolatility <- a2008$diseq <- a2008$durlessthan20 <- a2008$minpol <- a2008$pegedif <- a2008$polrange <- a2008$predl <- a2008$pubedmean90s <- a2008$regionmean <- a2008$regmeanopen <- a2008$ssh <- a2008$thresh <- a2008$ssh <- a2008$ssh <- a2008$ssh <- a2008$ssh <-a2008$flagc <- a2008$agei <- a2008$flagi <- a2008$coefficientpercent <- a2008$typeii <- a2008$typeiiold <- a2008$maxpol <- NULL

which( colnames(a2008)=="_merge" )
which( colnames(a2008)=="_mergebl" )
which( colnames(a2008)=="_mergebl2" )
a2008 <- a2008[,-c(333, 365, 374)]

## How many variables? 374: reduction necessary
dim(a2008)

## Which variables are in analysis and have missing data?
sum(is.na(a2008 $pubed))/nrow(a2008)*100
sum(is.na(a2008 $lagpubed))/nrow(a2008)*100
sum(is.na(a2008 $pctACFE))/nrow(a2008)*100
sum(is.na(a2008 $polity2))/nrow(a2008)*100
sum(is.na(a2008 $regpol))/nrow(a2008)*100 ## N
sum(is.na(a2008 $logopen))/nrow(a2008)*100
sum(is.na(a2008 $pop14))/nrow(a2008)*100
sum(is.na(a2008 $loggdp))/nrow(a2008)*100 
sum(is.na(a2008 $loggdpsq))/nrow(a2008)*100 
sum(is.na(a2008 $logpop))/nrow(a2008)*100 
sum(is.na(a2008 $govex2))/nrow(a2008)*100
sum(is.na(a2008 $year))/nrow(a2008)*100 ## N
sum(is.na(a2008 $pop))/nrow(a2008)*100
sum(is.na(a2008 $ccode))/nrow(a2008)*100 ## N
sum(is.na(a2008 $regdum1))/nrow(a2008)*100 ## N
sum(is.na(a2008 $comm))/nrow(a2008)*100 ## N
sum(is.na(a2008 $reg))/nrow(a2008)*100
sum(is.na(a2008 $terprim))/nrow(a2008)*100
sum(is.na(a2008 $oecd))/nrow(a2008)*100 ## N
sum(is.na(a2008 $terenrolgrs))/nrow(a2008)*100
sum(is.na(a2008 $primenrolgrs))/nrow(a2008)*100
sum(is.na(a2008 $l5pol2))/nrow(a2008)*100
sum(is.na(a2008 $l5open))/nrow(a2008)*100

analysis <- as.data.frame(cbind(a2008$pubed, a2008$lagpubed, a2008$pctACFE, a2008$polity2, a2008$logopen, a2008$pop14, a2008$loggdp, a2008$loggdpsq, a2008$logpop, a2008$govex2, a2008$pop, a2008$reg, a2008$terprim, a2008$terenrolgrs, a2008$primenrolgrs, a2008$l5pol2, a2008$l5open))

missing <-as.data.frame(cbind(as.integer(complete.cases(a2008$pubed)), as.integer(complete.cases(a2008$lagpubed)), as.integer(complete.cases(a2008$pctACFE)), as.integer(complete.cases(a2008$polity2)), as.integer(complete.cases(a2008$logopen)), as.integer(complete.cases(a2008$pop14)), as.integer(complete.cases(a2008$loggdp)), as.integer(complete.cases(a2008$loggdpsq)), as.integer(complete.cases(a2008$logpop)), as.integer(complete.cases(a2008$govex2)), as.integer(complete.cases(a2008$pop)), as.integer(complete.cases(a2008$reg)), as.integer(complete.cases(a2008$terprim)), as.integer(complete.cases(a2008$terenrolgrs)), as.integer(complete.cases(a2008$l5open)), 
as.integer(complete.cases(a2008$l5pol2)),  as.integer(complete.cases(a2008$primenrolgrs))))

dim(analysis)
dim(missing)
apply(missing, 2, sd)

## Remove analysis variables
## a2008$pubed <- a2008$lagpubed <- a2008$pctACFE <- a2008$polity2 <- a2008$logopen <- a2008$pop14 <- a2008$loggdp <- a2008$loggdpsq <- a2008$logpop <- a2008$govex2 <- a2008$pop <- a2008$reg <- a2008$terprim <- a2008$terenrolgrs <- a2008$primenrolgrs <- NULL
## head(a2008)
## var(a2008)

## Check correlations and missing values
round(cor(a2008$exdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exdut ))/nrow(a2008)*100
## N
a2008$exdut <- NULL

round(cor(a2008$exgdp  , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exgdp  , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exgdp  ))/nrow(a2008)*100
## Y

round(cor(a2008$fdigdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fdigdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fdigdp ))/nrow(a2008)*100
## N
a2008$fdigdp <- NULL

round(cor(a2008$fdicap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fdicap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fdicap ))/nrow(a2008)*100
## N
a2008$fdicap <- NULL

round(cor(a2008$gdpus , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gdpus , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gdpus ))/nrow(a2008)*100
## Y

round(cor(a2008$gdpcap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gdpcap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gdpcap ))/nrow(a2008)*100
## Y

round(cor(a2008$govex , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govex , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govex ))/nrow(a2008)*100
## Y

round(cor(a2008$gini , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gini , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gini ))/nrow(a2008)*100
## N
a2008$gini <- NULL

round(cor(a2008$imdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$imdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$imdut ))/nrow(a2008)*100
## N
a2008$imdut <- NULL

round(cor(a2008$imgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$imgdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$imgdp ))/nrow(a2008)*100
## Y

round(cor(a2008$open , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$open , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$open ))/nrow(a2008)*100
## Y

round(cor(a2008$pege , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pege , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pege ))/nrow(a2008)*100
## N
a2008$pege <- NULL

round(cor(a2008$logpege , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logpege , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logpege ))/nrow(a2008)*100
## N
a2008$logpege <- NULL

round(cor(a2008$lagpege , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lagpege , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lagpege ))/nrow(a2008)*100
## N
a2008$lagpege <- NULL

round(cor(a2008$edinten , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$edinten , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$edinten ))/nrow(a2008)*100
## N
a2008$edinten <- NULL

round(cor(a2008$duties , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$duties , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$duties ))/nrow(a2008)*100
## N
a2008$duties <- NULL

round(cor(a2008$logduties , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logduties , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logduties ))/nrow(a2008)*100
## N
a2008$logduties <- NULL

round(cor(a2008$lagpop14 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lagpop14 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lagpop14 ))/nrow(a2008)*100
## Y

round(cor(a2008$chpop14 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chpop14 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chpop14 ))/nrow(a2008)*100
## N
a2008$chpop14 <- NULL

round(cor(a2008$chedinten , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chedinten , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chedinten ))/nrow(a2008)*100
## N
a2008$chedinten <- NULL

round(cor(a2008$chlogopen , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chlogopen , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chlogopen ))/nrow(a2008)*100
## N
a2008$chlogopen <- NULL

round(cor(a2008$chlogduties , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chlogduties , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chlogduties ))/nrow(a2008)*100
## N
a2008$chlogduties <- NULL

round(cor(a2008$chgovex , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chgovex , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chgovex))/nrow(a2008)*100
## N
a2008$chgovex <- NULL

round(cor(a2008$chgdpcap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chgdpcap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chgdpcap ))/nrow(a2008)*100
## N
a2008$chgdpcap <- NULL

round(cor(a2008$edinten100 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$edinten100 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$edinten100 ))/nrow(a2008)*100
## N
a2008$edinten100 <- NULL

round(cor(a2008$ledinten100 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ledinten100 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ledinten100 ))/nrow(a2008)*100
## N
a2008$ledinten100 <- NULL

round(cor(a2008$pctbcfe , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pctbcfe , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pctbcfe ))/nrow(a2008)*100
## N
a2008$pctbcfe <- NULL

round(cor(a2008$pctbcfe , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pctbcfe , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pctbcfe ))/nrow(a2008)*100
## N
a2008$pctbcfe <- NULL

round(cor(a2008$pctacfe , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pctacfe , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pctacfe ))/nrow(a2008)*100
## N
a2008$pctacfe <- NULL

round(cor(a2008$logbcfe , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logbcfe , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logbcfe ))/nrow(a2008)*100
## N
a2008$logbcfe <- NULL

round(cor(a2008$logacfe , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logacfe , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logacfe ))/nrow(a2008)*100
## N
a2008$logacfe <- NULL

round(cor(a2008$democ , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$democ , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$democ ))/nrow(a2008)*100
## Y

round(cor(a2008$autoc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$autoc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$autoc ))/nrow(a2008)*100
## Y

round(cor(a2008$oldpolity , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oldpolity , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oldpolity ))/nrow(a2008)*100
## Y

round(cor(a2008$durable , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$durable , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$durable ))/nrow(a2008)*100
## N
a2008$durable <- NULL

round(cor(a2008$xrreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$xrreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$xrreg ))/nrow(a2008)*100
## Y

round(cor(a2008$xrcomp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$xrcomp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$xrcomp ))/nrow(a2008)*100
## Y

round(cor(a2008$xropen , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$xropen , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$xropen ))/nrow(a2008)*100
## N
a2008$xropen <- NULL

round(cor(a2008$xconst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$xconst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$xconst ))/nrow(a2008)*100
## Y

round(cor(a2008$parreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$parreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$parreg ))/nrow(a2008)*100
## Y

round(cor(a2008$parcomp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$parcomp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$parcomp ))/nrow(a2008)*100
## Y

round(cor(a2008$exrec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exrec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exrec ))/nrow(a2008)*100
## Y

round(cor(a2008$exconst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exconst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exconst ))/nrow(a2008)*100
## Y

round(cor(a2008$polcomp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$polcomp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$polcomp ))/nrow(a2008)*100
## Y

round(cor(a2008$l5pubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5pubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5pubed ))/nrow(a2008)*100
## N
a2008$l5pubed <- NULL

round(cor(a2008$gdpsq , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gdpsq , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gdpsq ))/nrow(a2008)*100
## N
a2008$gdpsq <- NULL

round(cor(a2008$gdpcapsq , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gdpcapsq , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gdpcapsq ))/nrow(a2008)*100
## Y

round(cor(a2008$logpopsq , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logpopsq , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logpopsq ))/nrow(a2008)*100
## Y

round(cor(a2008$logpubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logpubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logpubed ))/nrow(a2008)*100
## N
a2008$logpubed <- NULL

round(cor(a2008$loglagpubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$loglagpubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$loglagpubed ))/nrow(a2008)*100
## N
a2008$loglagpubed <- NULL

round(cor(a2008$logp14 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logp14 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logp14 ))/nrow(a2008)*100
## Y

round(cor(a2008$loggovex2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$loggovex2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$loggovex2 ))/nrow(a2008)*100
## N
a2008$loggovex2 <- NULL

round(cor(a2008$logyr , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logyr , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logyr ))/nrow(a2008)*100
## Y

round(cor(a2008$region , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$region , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$region ))/nrow(a2008)*100
## N
a2008$region <- NULL

round(cor(a2008$chpubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$chpubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$chpubed ))/nrow(a2008)*100
## N
a2008$chpubed <- NULL

round(cor(a2008$pege100 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pege100 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pege100 ))/nrow(a2008)*100
## N
a2008$pege100 <- NULL

round(cor(a2008$lpege100 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpege100 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpege100 ))/nrow(a2008)*100
## N
a2008$lpege100 <- NULL

round(cor(a2008$lpol2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpol2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpol2 ))/nrow(a2008)*100
## Y

round(cor(a2008$lregpol , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lregpol , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lregpol ))/nrow(a2008)*100
## Y

round(cor(a2008$l5regpol , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5regpol , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5regpol ))/nrow(a2008)*100
## Y

round(cor(a2008$system , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$system , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$system ))/nrow(a2008)*100
## N
a2008$system <- NULL

round(cor(a2008$yrsoffc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$yrsoffc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$yrsoffc ))/nrow(a2008)*100
## N
a2008$yrsoffc <- NULL

round(cor(a2008$finittrm , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$finittrm , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$finittrm ))/nrow(a2008)*100
## N
a2008$finittrm <- NULL

round(cor(a2008$military , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$military , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$military ))/nrow(a2008)*100
## N
a2008$military <- NULL

round(cor(a2008$defmin , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$defmin , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$defmin ))/nrow(a2008)*100
## N
a2008$defmin <- NULL

round(cor(a2008$percent1 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$percent1 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$percent1 ))/nrow(a2008)*100
## N
a2008$percent1 <- NULL

round(cor(a2008$percentl , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$percentl , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$percentl ))/nrow(a2008)*100
## N
a2008$percentl <- NULL

round(cor(a2008$prtyin , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$prtyin , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$prtyin ))/nrow(a2008)*100
## N
a2008$prtyin <- NULL

round(cor(a2008$execnat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execnat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execnat ))/nrow(a2008)*100
## N
a2008$execnat <- NULL

round(cor(a2008$execrurl , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execrurl , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execrurl ))/nrow(a2008)*100
## N
a2008$execrurl <- NULL

round(cor(a2008$execreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execreg ))/nrow(a2008)*100
## N
a2008$execreg <- NULL

round(cor(a2008$execrel , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execrel , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execrel ))/nrow(a2008)*100
## N
a2008$execrel <- NULL

round(cor(a2008$execage , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execage , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execage ))/nrow(a2008)*100
## N
a2008$execage <- NULL

round(cor(a2008$allhouse , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$allhouse , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$allhouse ))/nrow(a2008)*100
## N
a2008$allhouse <- NULL

round(cor(a2008$herfgov , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$herfgov , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$herfgov ))/nrow(a2008)*100
## N
a2008$herfgov <- NULL

round(cor(a2008$numgov , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$numgov , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$numgov ))/nrow(a2008)*100
## N
a2008$numgov <- NULL

round(cor(a2008$govfrac , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govfrac , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govfrac ))/nrow(a2008)*100
## N
a2008$govfrac <- NULL

round(cor(a2008$govseat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govseat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govseat ))/nrow(a2008)*100
## N
a2008$govseat <- NULL

round(cor(a2008$govnat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govnat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govnat ))/nrow(a2008)*100
## N
a2008$govnat <- NULL

round(cor(a2008$govrurl , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govrurl , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govrurl ))/nrow(a2008)*100
## N
a2008$govrurl <- NULL

round(cor(a2008$govreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govreg ))/nrow(a2008)*100
## N
a2008$govreg <- NULL

round(cor(a2008$govrel, analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govrel , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govrel ))/nrow(a2008)*100
## N
a2008$govrel <- NULL

round(cor(a2008$govage , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govage , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govage ))/nrow(a2008)*100
## N
a2008$govage <- NULL

round(cor(a2008$govseat2, analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govseat2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govseat2 ))/nrow(a2008)*100
## N
a2008$govseat2 <- NULL

round(cor(a2008$govnat2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govnat2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govnat2 ))/nrow(a2008)*100
## N
a2008$govnat2 <- NULL

round(cor(a2008$govrurl2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govrurl2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govrurl2 ))/nrow(a2008)*100
## N
a2008$govrurl2 <- NULL

round(cor(a2008$govreg2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govreg2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govreg2 ))/nrow(a2008)*100
## N
a2008$govreg2 <- NULL

round(cor(a2008$govage2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govage2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govage2 ))/nrow(a2008)*100
## N
a2008$govage2 <- NULL

round(cor(a2008$govseat3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govseat3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govseat3 ))/nrow(a2008)*100
## N
a2008$govseat3 <- NULL

round(cor(a2008$govnat3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govnat3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govnat3 ))/nrow(a2008)*100
## N
a2008$govnat3 <- NULL

round(cor(a2008$govrurl3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govrurl3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govrurl3 ))/nrow(a2008)*100
## N
a2008$govrurl3 <- NULL

round(cor(a2008$govreg3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govreg3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govreg3 ))/nrow(a2008)*100
## N
a2008$govreg3 <- NULL

round(cor(a2008$govage3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govage3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govage3 ))/nrow(a2008)*100
## N
a2008$govage3 <- NULL

round(cor(a2008$govoth , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govoth , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govoth ))/nrow(a2008)*100
## N
a2008$govoth <- NULL

round(cor(a2008$govothst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govothst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govothst ))/nrow(a2008)*100
## N
a2008$govothst <- NULL

round(cor(a2008$herfopp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$herfopp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$herfopp ))/nrow(a2008)*100
## N
a2008$herfopp <- NULL

round(cor(a2008$oppfrac , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppfrac , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppfrac ))/nrow(a2008)*100
## N
a2008$oppfrac <- NULL

round(cor(a2008$numopp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$numopp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$numopp ))/nrow(a2008)*100
## N
a2008$numopp <- NULL

round(cor(a2008$oppseat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppseat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppseat ))/nrow(a2008)*100
## N
a2008$oppseat <- NULL

round(cor(a2008$oppnat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppnat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppnat ))/nrow(a2008)*100
## N
a2008$oppnat <- NULL

round(cor(a2008$oppreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppreg ))/nrow(a2008)*100
## N
a2008$oppreg <- NULL

round(cor(a2008$oppage , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppage , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppage ))/nrow(a2008)*100
## N
a2008$oppage <- NULL

round(cor(a2008$oppseat2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppseat2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppseat2 ))/nrow(a2008)*100
## N
a2008$oppseat2 <- NULL

round(cor(a2008$oppseat3 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppseat3 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppseat3 ))/nrow(a2008)*100
## N
a2008$oppseat3 <- NULL

round(cor(a2008$oppoth , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppoth , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppoth ))/nrow(a2008)*100
## N
a2008$oppoth <- NULL

round(cor(a2008$oppothst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppothst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppothst ))/nrow(a2008)*100
## N
a2008$oppothst <- NULL

round(cor(a2008$ulprty , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ulprty , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ulprty ))/nrow(a2008)*100
## N
a2008$ulprty <- NULL

round(cor(a2008$numul , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$numul , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$numul ))/nrow(a2008)*100
## N
a2008$numul <- NULL

round(cor(a2008$herftot , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$herftot , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$herftot ))/nrow(a2008)*100
## N
a2008$herftot <- NULL

round(cor(a2008$frac , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$frac , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$frac ))/nrow(a2008)*100
## N
a2008$frac <- NULL

round(cor(a2008$oppmajh , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppmajh , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppmajh ))/nrow(a2008)*100
## N
a2008$oppmajh <- NULL

round(cor(a2008$oppmajs , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oppmajs , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oppmajs ))/nrow(a2008)*100
## N
a2008$oppmajs <- NULL

round(cor(a2008$dateleg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$dateleg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$dateleg ))/nrow(a2008)*100
## N
a2008$dateleg <- NULL

round(cor(a2008$dateexec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$dateexec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$dateexec ))/nrow(a2008)*100
## N
a2008$dateexec <- NULL

round(cor(a2008$maj , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$maj , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$maj ))/nrow(a2008)*100
## N
a2008$maj <- NULL

round(cor(a2008$partyage , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$partyage , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$partyage ))/nrow(a2008)*100
## N
a2008$partyage <- NULL

round(cor(a2008$legelec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$legelec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$legelec ))/nrow(a2008)*100
## N
a2008$legelec <- NULL

round(cor(a2008$exelec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exelec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exelec ))/nrow(a2008)*100
## N
a2008$exelec <- NULL

round(cor(a2008$execspec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$execspec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$execspec ))/nrow(a2008)*100
## N
a2008$execspec <- NULL

round(cor(a2008$govspec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$govspec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$govspec ))/nrow(a2008)*100
## N
a2008$govspec <- NULL

round(cor(a2008$coalspec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$coalspec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$coalspec ))/nrow(a2008)*100
## N
a2008$coalspec <- NULL

round(cor(a2008$liec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$liec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$liec ))/nrow(a2008)*100
## N
a2008$liec <- NULL

round(cor(a2008$eiec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$eiec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$eiec ))/nrow(a2008)*100
## N
a2008$eiec <- NULL

round(cor(a2008$mdmh , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$mdmh , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$mdmh ))/nrow(a2008)*100
## N
a2008$mdmh <- NULL

round(cor(a2008$mdms , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$mdms , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$mdms ))/nrow(a2008)*100
## N
a2008$mdms <- NULL

round(cor(a2008$pluralty , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pluralty , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pluralty ))/nrow(a2008)*100
## N
a2008$pluralty <- NULL

round(cor(a2008$pr , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pr , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pr ))/nrow(a2008)*100
## N
a2008$pr <- NULL

round(cor(a2008$housesys , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$housesys , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$housesys ))/nrow(a2008)*100
## N
a2008$housesys <- NULL

round(cor(a2008$sensys , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$sensys , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$sensys ))/nrow(a2008)*100
## N
a2008$sensys <- NULL

round(cor(a2008$dhondt , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$dhondt , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$dhondt ))/nrow(a2008)*100
## N
a2008$exdut <- NULL

round(cor(a2008$exdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exdut ))/nrow(a2008)*100
## N
a2008$dhondt <- NULL

round(cor(a2008$cl , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$cl , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$cl ))/nrow(a2008)*100
## N
a2008$cl <- NULL

round(cor(a2008$select , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$select , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$select ))/nrow(a2008)*100
## N
a2008$select <- NULL

round(cor(a2008$fraud , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fraud , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fraud ))/nrow(a2008)*100
## N
a2008$fraud <- NULL

round(cor(a2008$tenlong , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tenlong , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tenlong ))/nrow(a2008)*100
## N
a2008$tenlong <- NULL

round(cor(a2008$tenshort , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tenshort , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tenshort ))/nrow(a2008)*100
## N
a2008$tenshort <- NULL

round(cor(a2008$tensys , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tensys , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tensys ))/nrow(a2008)*100
## N
a2008$tensys <- NULL

round(cor(a2008$checks , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$checks , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$checks ))/nrow(a2008)*100
## N
a2008$checks <- NULL

round(cor(a2008$polariz , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$polariz , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$polariz ))/nrow(a2008)*100
## N
a2008$polariz <- NULL

round(cor(a2008$stabs , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$stabs , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$stabs ))/nrow(a2008)*100
## N
a2008$stabs <- NULL

round(cor(a2008$stabns , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$stabns , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$stabns ))/nrow(a2008)*100
## N
a2008$stabns <- NULL

round(cor(a2008$auton , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$auton , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$auton ))/nrow(a2008)*100
## N
a2008$auton <- NULL

round(cor(a2008$muni , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$muni , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$muni ))/nrow(a2008)*100
## N
a2008$muni <- NULL

round(cor(a2008$state , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$state , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$state ))/nrow(a2008)*100
## N
a2008$state <- NULL

round(cor(a2008$author , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$author , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$author ))/nrow(a2008)*100
## N
a2008$author <- NULL

round(cor(a2008$stconst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$stconst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$stconst ))/nrow(a2008)*100
## N
a2008$stconst <- NULL

round(cor(a2008$laglogopen , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$laglogopen , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$laglogopen ))/nrow(a2008)*100
## Y

round(cor(a2008$ctyalpha , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ctyalpha , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ctyalpha ))/nrow(a2008)*100
## N
a2008$ctyalpha <- NULL

round(cor(a2008$reglag , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$reglag , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$reglag ))/nrow(a2008)*100
## N
a2008$reglag <- NULL

round(cor(a2008$ager , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ager , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ager ))/nrow(a2008)*100
## N
a2008$ager <- NULL

round(cor(a2008$tjk , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tjk , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tjk ))/nrow(a2008)*100
## N
a2008$tjk <- NULL

round(cor(a2008$tjklag , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tjklag , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tjklag ))/nrow(a2008)*100
## N
a2008$tjklag <- NULL

round(cor(a2008$rspell , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$rspell , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$rspell ))/nrow(a2008)*100
## Y

round(cor(a2008$inst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$inst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$inst ))/nrow(a2008)*100
## Y

round(cor(a2008$instlag , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$instlag , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$instlag ))/nrow(a2008)*100
## N
a2008$instlag <- NULL

round(cor(a2008$tti , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tti , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tti ))/nrow(a2008)*100
## N
a2008$tti <- NULL

round(cor(a2008$ispell , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ispell , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ispell ))/nrow(a2008)*100
## Y

round(cor(a2008$inst2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$inst2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$inst2 ))/nrow(a2008)*100
## Y

round(cor(a2008$inst2lag , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$inst2lag , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$inst2lag ))/nrow(a2008)*100
## N
a2008$inst2lag <- NULL

round(cor(a2008$tti2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tti2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tti2 ))/nrow(a2008)*100
## N
a2008$tti2 <- NULL

round(cor(a2008$agei2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$agei2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$agei2 ))/nrow(a2008)*100
## N
a2008$agei2 <- NULL

round(cor(a2008$i2spell , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$i2spell , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$i2spell ))/nrow(a2008)*100
## Y

round(cor(a2008$confid , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$confid , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$confid ))/nrow(a2008)*100
## N
a2008$confid <- NULL

round(cor(a2008$incumb , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$incumb , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$incumb ))/nrow(a2008)*100
## N
a2008$incumb <- NULL

round(cor(a2008$stra , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$stra , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$stra ))/nrow(a2008)*100
## N
a2008$stra <- NULL

round(cor(a2008$hinst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$hinst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$hinst ))/nrow(a2008)*100
## Y

round(cor(a2008$hinstlag , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$hinstlag , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$hinstlag ))/nrow(a2008)*100
## N
a2008$hinstlag <- NULL

round(cor(a2008$fhinst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fhinst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fhinst ))/nrow(a2008)*100
## N
a2008$fhinst <- NULL

round(cor(a2008$fhinste , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fhinste , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fhinste ))/nrow(a2008)*100
## N
a2008$fhinste <- NULL

round(cor(a2008$agehinst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$agehinst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$agehinst ))/nrow(a2008)*100
## Y

round(cor(a2008$previnst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$previnst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$previnst ))/nrow(a2008)*100
## N
a2008$previnst <- NULL

round(cor(a2008$tthinst , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tthinst , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tthinst ))/nrow(a2008)*100
## N
a2008$tthinst <- NULL

round(cor(a2008$regold , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$regold , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$regold ))/nrow(a2008)*100
## N
a2008$regold <- NULL

round(cor(a2008$instold , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$instold , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$instold ))/nrow(a2008)*100
## N
a2008$instold <- NULL

round(cor(a2008$inst2old , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$inst2old , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$inst2old ))/nrow(a2008)*100
## N
a2008$inst2old <- NULL

round(cor(a2008$incumbold , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$incumbold , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$incumbold ))/nrow(a2008)*100
## N
a2008$incumbold <- NULL

round(cor(a2008$region2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$region2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$region2 ))/nrow(a2008)*100
## Y

round(cor(a2008$odwp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$odwp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$odwp ))/nrow(a2008)*100
## Y

round(cor(a2008$comp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$comp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$comp ))/nrow(a2008)*100
## N
a2008$comp <- NULL

round(cor(a2008$part , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$part , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$part ))/nrow(a2008)*100
## N
a2008$part <- NULL

round(cor(a2008$totvote , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$totvote , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$totvote ))/nrow(a2008)*100
## N
a2008$totvote <- NULL

round(cor(a2008$regist , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$regist , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$regist ))/nrow(a2008)*100
## N
a2008$regist <- NULL

round(cor(a2008$turnreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$turnreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$turnreg ))/nrow(a2008)*100
## N
a2008$turnreg <- NULL

round(cor(a2008$voteagepop , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exd voteagepop ut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$voteagepop ))/nrow(a2008)*100
## N
a2008$voteagepop <- NULL

round(cor(a2008$turnvap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$turnvap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$turnvap ))/nrow(a2008)*100
## N
a2008$turnvap <- NULL

round(cor(a2008$invalid , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$invalid , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$invalid ))/nrow(a2008)*100
## N
a2008$invalid <- NULL

round(cor(a2008$lrgprty , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lrgprty , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lrgprty ))/nrow(a2008)*100
## N
a2008$lrgprty <- NULL

round(cor(a2008$prights , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$prights , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$prights ))/nrow(a2008)*100
## N
a2008$prights <- NULL

round(cor(a2008$civrights , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$civrights , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$civrights ))/nrow(a2008)*100
## N
a2008$civrights <- NULL

round(cor(a2008$secondary , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$secondary , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$secondary ))/nrow(a2008)*100
## N
a2008$secondary <- NULL

round(cor(a2008$primary , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$primary , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$primary ))/nrow(a2008)*100
## N
a2008$primary <- NULL

round(cor(a2008$tertiary , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tertiary , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tertiary ))/nrow(a2008)*100
## N
a2008$tertiary <- NULL

round(cor(a2008$labforprim , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$labforprim , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$labforprim ))/nrow(a2008)*100
## N
a2008$labforprim <- NULL

round(cor(a2008$labforsec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$labforsec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$labforsec ))/nrow(a2008)*100
## N
a2008$labforsec <- NULL

round(cor(a2008$labforter , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$labforter , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$labforter ))/nrow(a2008)*100
## N
a2008$labforter <- NULL

round(cor(a2008$primcomp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$primcomp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$primcomp ))/nrow(a2008)*100
## N
a2008$primcomp <- NULL

round(cor(a2008$primenrolnet , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$primenrolnet , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$primenrolnet ))/nrow(a2008)*100
## N
a2008$primenrolnet <- NULL

round(cor(a2008$primpuptea , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$primpuptea , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$primpuptea ))/nrow(a2008)*100
## N
a2008$primpuptea <- NULL

round(cor(a2008$primtraintea , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$primtraintea , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$primtraintea ))/nrow(a2008)*100
## N
a2008$primtraintea <- NULL

round(cor(a2008$savingseduc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$savingseduc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$savingseduc ))/nrow(a2008)*100
## N
a2008$savingseduc <- NULL

round(cor(a2008$secenrolgrs , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$secenrolgrs , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$secenrolgrs ))/nrow(a2008)*100
## N
a2008$secenrolgrs <- NULL

round(cor(a2008$secenrolnet , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$secenrolnet , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$secenrolnet ))/nrow(a2008)*100
## N
a2008$secenrolnet <- NULL

round(cor(a2008$loggdpcap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$loggdpcap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$loggdpcap ))/nrow(a2008)*100
## Y

round(cor(a2008$logterprim , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logterprim , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logterprim ))/nrow(a2008)*100
## N
a2008$logterprim <- NULL

round(cor(a2008$millab , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$millab , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$millab ))/nrow(a2008)*100
## N
a2008$millab <- NULL

round(cor(a2008$milgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$milgdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$milgdp ))/nrow(a2008)*100
## N
a2008$milgdp <- NULL

round(cor(a2008$milgov , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$milgov , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$milgov ))/nrow(a2008)*100
## N
a2008$milgov <- NULL

round(cor(a2008$aut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$aut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$aut ))/nrow(a2008)*100
## N
a2008$aut <- NULL

round(cor(a2008$britcol , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$britcol , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$britcol ))/nrow(a2008)*100
## N
a2008$britcol <- NULL

round(cor(a2008$comex , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$comex , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$comex ))/nrow(a2008)*100
## N
a2008$comex <- NULL

round(cor(a2008$divided , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$divided , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$divided ))/nrow(a2008)*100
## N
a2008$divided <- NULL

round(cor(a2008$edt , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$edt , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$edt ))/nrow(a2008)*100
## N
a2008$edt <- NULL

round(cor(a2008$femsec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$femsec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$femsec ))/nrow(a2008)*100
## N
a2008$femsec <- NULL

round(cor(a2008$fertil , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$fertil , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$fertil ))/nrow(a2008)*100
## N
a2008$fertil <- NULL

round(cor(a2008$g , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$g , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$g ))/nrow(a2008)*100
## N
a2008$g <- NULL

round(cor(a2008$gdpw , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gdpw , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gdpw ))/nrow(a2008)*100
## N
a2008$gdpw <- NULL

round(cor(a2008$gxpdeduc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gxpdeduc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gxpdeduc ))/nrow(a2008)*100
## N
a2008$gxpdeduc <- NULL

round(cor(a2008$gxpdhlth , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gxpdhlth , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gxpdhlth ))/nrow(a2008)*100
## N
a2008$gxpdhlth <- NULL

round(cor(a2008$gxpdssec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gxpdssec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gxpdssec ))/nrow(a2008)*100
## N
a2008$gxpdssec <- NULL

round(cor(a2008$gxpktotl , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$gxpktotl , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$gxpktotl ))/nrow(a2008)*100
## N
a2008$gxpktotl <- NULL

round(cor(a2008$ineq , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ineq , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ineq ))/nrow(a2008)*100
## N
a2008$ineq <- NULL

round(cor(a2008$infmort , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$infmort , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$infmort ))/nrow(a2008)*100
## N
a2008$infmort <- NULL

round(cor(a2008$ks , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ks , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ks ))/nrow(a2008)*100
## N
a2008$ks <- NULL

round(cor(a2008$lagreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lagreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lagreg ))/nrow(a2008)*100
## N
a2008$lagreg <- NULL

round(cor(a2008$laws , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$laws , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$laws ))/nrow(a2008)*100
## N
a2008$laws <- NULL

round(cor(a2008$level , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$level , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$level ))/nrow(a2008)*100
## N
a2008$level <- NULL

round(cor(a2008$lfagric , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lfagric , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lfagric ))/nrow(a2008)*100
## N
a2008$lfagric <- NULL

round(cor(a2008$ls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ls ))/nrow(a2008)*100
## N
a2008$ls <- NULL

round(cor(a2008$mobilize , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$mobilize , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$mobilize ))/nrow(a2008)*100
## N
a2008$mobilize <- NULL

round(cor(a2008$moslem , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$moslem , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$moslem ))/nrow(a2008)*100
## N
a2008$moslem <- NULL

round(cor(a2008$odrp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$odrp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$odrp ))/nrow(a2008)*100
## N
a2008$odrp <- NULL

round(cor(a2008$oil , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oil , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oil ))/nrow(a2008)*100
## N
a2008$oil <- NULL

round(cor(a2008$openc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$openc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$openc ))/nrow(a2008)*100
## N
a2008$openc <- NULL

round(cor(a2008$party , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$party , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$party ))/nrow(a2008)*100
## N
a2008$party <- NULL

round(cor(a2008$popg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$popg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$popg))/nrow(a2008)*100
## N
a2008$popg <- NULL

round(cor(a2008$xr , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$xr , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$xr ))/nrow(a2008)*100
## N
a2008$xr <- NULL

round(cor(a2008$exdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$exdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$exdut ))/nrow(a2008)*100
## N
a2008$exdut <- NULL

round(cor(a2008$ledinten , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ledinten , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ledinten ))/nrow(a2008)*100
## N
a2008$ledinten <- NULL

round(cor(a2008$tersecpr , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tersecpr , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tersecpr ))/nrow(a2008)*100
## N
a2008$tersecpr <- NULL

round(cor(a2008$secprim , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$secprim , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$secprim ))/nrow(a2008)*100
## N
a2008$secprim <- NULL

round(cor(a2008$tersec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tersec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tersec ))/nrow(a2008)*100
## N
a2008$tersec <- NULL

round(cor(a2008$tersec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$teapri , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$teapri ))/nrow(a2008)*100
## N
a2008$teapri <- NULL

round(cor(a2008$teasec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$teasec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$teasec ))/nrow(a2008)*100
## N
a2008$teasec <- NULL

round(cor(a2008$geepri , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$geepri , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$geepri ))/nrow(a2008)*100
## N
a2008$geepri <- NULL

round(cor(a2008$geesec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$geesec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$geesec ))/nrow(a2008)*100
## N
a2008$geesec <- NULL

round(cor(a2008$shpupp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$shpupp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$shpupp ))/nrow(a2008)*100
## N
a2008$shpupp <- NULL

round(cor(a2008$shpups , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$shpups , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$shpups ))/nrow(a2008)*100
## N
a2008$shpups <- NULL

round(cor(a2008$reppri , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$reppri , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$reppri ))/nrow(a2008)*100
## N
a2008$reppri <- NULL

round(cor(a2008$repsec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$repsec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$repsec ))/nrow(a2008)*100
## N
a2008$repsec <- NULL

round(cor(a2008$schday , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$schday , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$schday ))/nrow(a2008)*100
## N
a2008$schday <- NULL

round(cor(a2008$schtime , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$schtime , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$schtime ))/nrow(a2008)*100
## N
a2008$schtime <- NULL

round(cor(a2008$salarp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$salarp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$salarp ))/nrow(a2008)*100
## N
a2008$salarp <- NULL

round(cor(a2008$shsalp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$shsalp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$shsalp ))/nrow(a2008)*100
## N
a2008$shsalp <- NULL

round(cor(a2008$l5shsalp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5shsalp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5shsalp ))/nrow(a2008)*100
## N
a2008$l5shsalp <- NULL

round(cor(a2008$yearsq , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$yearsq , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$yearsq ))/nrow(a2008)*100
## Y

round(cor(a2008$l5salarp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5salarp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5salarp ))/nrow(a2008)*100
## N
a2008$l5salarp <- NULL

round(cor(a2008$terenrol , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$terenrol , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$terenrol ))/nrow(a2008)*100
## N
a2008$terenrol <- NULL

round(cor(a2008$tered , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tered , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tered ))/nrow(a2008)*100
## N
a2008$tered <- NULL

round(cor(a2008$tergnpcap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tergnpcap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tergnpcap ))/nrow(a2008)*100
## N
a2008$tergnpcap <- NULL

round(cor(a2008$tersci , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tersci , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tersci ))/nrow(a2008)*100
## N
a2008$tersci <- NULL

round(cor(a2008$lit , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lit , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lit ))/nrow(a2008)*100
## N
a2008$lit <- NULL

round(cor(a2008$cap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$cap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$cap ))/nrow(a2008)*100
## N
a2008$cap <- NULL

round(cor(a2008$cur , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$cur , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$cur ))/nrow(a2008)*100
## N
a2008$cur <- NULL

round(cor(a2008$teacherovered , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$teacherovered , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$teacherovered ))/nrow(a2008)*100
## N
a2008$teacherovered <- NULL

round(cor(a2008$teachmat , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$teachmat , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$teachmat ))/nrow(a2008)*100
## N
a2008$teachmat <- NULL

round(cor(a2008$compulsory , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$compulsory , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$compulsory ))/nrow(a2008)*100
## N
a2008$compulsory <- NULL

round(cor(a2008$privedgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$privedgdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$privedgdp ))/nrow(a2008)*100
## N
a2008$privedgdp <- NULL

round(cor(a2008$privedtotaled , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$privedtotaled , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$privedtotaled ))/nrow(a2008)*100
## N
a2008$privedtotaled <- NULL

round(cor(a2008$compchange , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$compchange , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$compchange ))/nrow(a2008)*100
## N
a2008$compchange <- NULL

round(cor(a2008$manufex , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$manufex , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$manufex ))/nrow(a2008)*100
## N
a2008$manufex <- NULL

round(cor(a2008$bopgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$bopgdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$bopgdp ))/nrow(a2008)*100
## N
a2008$bopgdp <- NULL

round(cor(a2008$hitekex , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$hitekex , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$hitekex ))/nrow(a2008)*100
## N
a2008$hitekex <- NULL

round(cor(a2008$hitekexgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$hitekexgdp  , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$hitekexgdp ))/nrow(a2008)*100
## N
a2008$hitekexgdp <- NULL

round(cor(a2008$logopdif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logopdif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logopdif ))/nrow(a2008)*100
## Y

round(cor(a2008$area , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$area , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$area ))/nrow(a2008)*100
## N
a2008$area <- NULL

round(cor(a2008$logimdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logimdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logimdut ))/nrow(a2008)*100
## N
a2008$logimdut <- NULL

round(cor(a2008$logexdut , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logexdut , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logexdut ))/nrow(a2008)*100
## N
a2008$logexdut <- NULL

round(cor(a2008$poldif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$poldif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$poldif ))/nrow(a2008)*100
## Y

round(cor(a2008$pubedreg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pubedreg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pubedreg ))/nrow(a2008)*100
## Y

round(cor(a2008$pubeddif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pubeddif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pubeddif ))/nrow(a2008)*100
## N
a2008$pubeddif <- NULL

round(cor(a2008$l5pubeddif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5pubeddif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5pubeddif ))/nrow(a2008)*100
## N
a2008$l5pubeddif <- NULL

round(cor(a2008$logopenl5pubeddif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logopenl5pubeddif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logopenl5pubeddif ))/nrow(a2008)*100
## N
a2008$logopenl5pubeddif <- NULL

round(cor(a2008$openl5pubeddif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$openl5pubeddif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$openl5pubeddif ))/nrow(a2008)*100
## N
a2008$openl5pubeddif <- NULL

round(cor(a2008$pegereg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pegereg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pegereg ))/nrow(a2008)*100
## N
a2008$pegereg <- NULL

round(cor(a2008$l5pegedif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5pegedif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5pegedif ))/nrow(a2008)*100
## N
a2008$l5pegedif <- NULL

round(cor(a2008$logopenl5pegedif , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logopenl5pegedif , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logopenl5pegedif ))/nrow(a2008)*100
## N
a2008$logopenl5pegedif <- NULL

round(cor(a2008$pctBCFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pctBCFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pctBCFE ))/nrow(a2008)*100
## N
a2008$pctBCFE <- NULL

round(cor(a2008$ctyeffectBCFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ctyeffectBCFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ctyeffectBCFE ))/nrow(a2008)*100
## N
a2008$ctyeffectBCFE <- NULL

round(cor(a2008$ctyeffectACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ctyeffectACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ctyeffectACFE ))/nrow(a2008)*100
## N
a2008$ctyeffectACFE <- NULL

round(cor(a2008$ctyeffectsuperACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ctyeffectsuperACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ctyeffectsuperACFE ))/nrow(a2008)*100
## N
a2008$ctyeffectsuperACFE <- NULL

round(cor(a2008$openness , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$openness , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$openness ))/nrow(a2008)*100
## N
a2008$openness <- NULL

round(cor(a2008$tariffs , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$tariffs , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$tariffs ))/nrow(a2008)*100
## N
a2008$tariffs <- NULL

round(cor(a2008$owti85 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$owti85 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$owti85 ))/nrow(a2008)*100
## N
a2008$owti85 <- NULL

round(cor(a2008$leamer82 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$leamer82 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$leamer82 ))/nrow(a2008)*100
## N
a2008$leamer82 <- NULL

round(cor(a2008$dollar80 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$dollar80 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$dollar80 ))/nrow(a2008)*100
## N
a2008$dollar80 <- NULL

round(cor(a2008$oldBCFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oldBCFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oldBCFE ))/nrow(a2008)*100
## N
a2008$oldBCFE <- NULL

round(cor(a2008$oldACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oldACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oldACFE ))/nrow(a2008)*100
## N
a2008$oldACFE <- NULL

round(cor(a2008$BCFE10000 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$BCFE10000 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$BCFE10000 ))/nrow(a2008)*100
## N
a2008$BCFE10000 <- NULL

round(cor(a2008$BCFE100 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$BCFE100 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$BCFE100 ))/nrow(a2008)*100
## N
a2008$BCFE100 <- NULL

round(cor(a2008$logBCFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logBCFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logBCFE ))/nrow(a2008)*100
## N
a2008$logBCFE <- NULL

round(cor(a2008$logACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logACFE ))/nrow(a2008)*100
## N
a2008$logACFE <- NULL

round(cor(a2008$oecd2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$oecd2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$oecd2 ))/nrow(a2008)*100
## Y

round(cor(a2008$polACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$polACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$polACFE ))/nrow(a2008)*100
## N
a2008$polACFE <- NULL

round(cor(a2008$l5pctACFE , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5pctACFE , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5pctACFE ))/nrow(a2008)*100
## N
a2008$l5pctACFEpoldur <- NULL

round(cor(a2008$poldur , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$poldur , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$poldur ))/nrow(a2008)*100
## Y

round(cor(a2008$lagprivedgdp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lagprivedgdp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lagprivedgdp ))/nrow(a2008)*100
## N
a2008$lagprivedgdp <- NULL

round(cor(a2008$pubpol , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pubpol , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pubpol ))/nrow(a2008)*100
## N
a2008$pubpol <- NULL

round(cor(a2008$l5shpupp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5shpupp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5shpupp ))/nrow(a2008)*100
## N
a2008$l5shpupp <- NULL

round(cor(a2008$l5shpups , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5shpups , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5shpups ))/nrow(a2008)*100
## N
a2008$l5shpups <- NULL

round(cor(a2008$l5repsec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5repsec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5repsec ))/nrow(a2008)*100
## N
a2008$l5repsec <- NULL

round(cor(a2008$l5schtime , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5schtime , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5schtime ))/nrow(a2008)*100
## N
a2008$l5schtime <- NULL

round(cor(a2008$lprimenrolnet , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lprimenrolnet , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lprimenrolnet ))/nrow(a2008)*100
## N
a2008$lprimenrolnet <- NULL

round(cor(a2008$l5teasec , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5teasec , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5teasec ))/nrow(a2008)*100
## N
a2008$l5teasec <- NULL

round(cor(a2008$l5teapri , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5teapri , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5teapri ))/nrow(a2008)*100
## N
a2008$l5teapri <- NULL

round(cor(a2008$lgdpcap , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lgdpcap , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lgdpcap ))/nrow(a2008)*100
## Y

round(cor(a2008$poloil , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$poloil , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$poloil ))/nrow(a2008)*100
## N
a2008$poloil <- NULL

round(cor(a2008$polcomm , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$polcomm , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$polcomm ))/nrow(a2008)*100
## N
a2008$polcomm <- NULL

round(cor(a2008$logopenoil , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logopenoil , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logopenoil ))/nrow(a2008)*100
## N
a2008$logopenoil <- NULL

round(cor(a2008$logopencomm , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$logopencomm , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$logopencomm ))/nrow(a2008)*100
## N
a2008$logopencomm <- NULL

round(cor(a2008$durabledem , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$durabledem , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$durabledem ))/nrow(a2008)*100
## N
a2008$durabledem <- NULL

round(cor(a2008$poldurlt20 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$poldurlt20 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$poldurlt20 ))/nrow(a2008)*100
## Y

round(cor(a2008$shsalppubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$shsalppubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$shsalppubed ))/nrow(a2008)*100
## N
a2008$shsalppubed <- NULL

round(cor(a2008$lshsalppubed , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lshsalppubed , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lshsalppubed ))/nrow(a2008)*100
## N
a2008$lshsalppubed <- NULL

round(cor(a2008$lu , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lu , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lu ))/nrow(a2008)*100
## N
a2008$lu <- NULL

round(cor(a2008$lp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lp ))/nrow(a2008)*100
## N
a2008$lp <- NULL

round(cor(a2008$lsbarrolee , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lsbarrolee , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lsbarrolee ))/nrow(a2008)*100
## N
a2008$lsbarrolee <- NULL

round(cor(a2008$lh , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lh , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lh ))/nrow(a2008)*100
## N
a2008$lh <- NULL

round(cor(a2008$lpc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpc ))/nrow(a2008)*100
## N
a2008$lpc <- NULL

round(cor(a2008$lsc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lsc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lsc ))/nrow(a2008)*100
## N
a2008$lsc <- NULL

round(cor(a2008$lhc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lhc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lhc ))/nrow(a2008)*100
## N
a2008$lhc <- NULL

round(cor(a2008$l5lsbarrolee , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lsbarrolee , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lsbarrolee ))/nrow(a2008)*100
## N
a2008$l5lsbarrolee <- NULL

round(cor(a2008$l5lsc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lsc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lsc ))/nrow(a2008)*100
## N
a2008$l5lsc <- NULL

round(cor(a2008$l5lh , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$ l5lh , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$ l5lh ))/nrow(a2008)*100
## N
a2008$ l5lh <- NULL

round(cor(a2008$l5lhc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lhc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lhc ))/nrow(a2008)*100
## N
a2008$l5lhc <- NULL

round(cor(a2008$l5lp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lp ))/nrow(a2008)*100
## N
a2008$l5lp <- NULL

round(cor(a2008$lpplusls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpplusls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpplusls ))/nrow(a2008)*100
## N
a2008$lpplusls <- NULL

round(cor(a2008$l5lpc , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lpc , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lpc ))/nrow(a2008)*100
## N
a2008$l5lpc <- NULL

round(cor(a2008$l5lu , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lu , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lu ))/nrow(a2008)*100
## N
a2008$l5lu <- NULL

round(cor(a2008$pyr , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$pyr , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$pyr ))/nrow(a2008)*100
## N
a2008$pyr <- NULL

round(cor(a2008$lpcls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpcls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpcls ))/nrow(a2008)*100
## N
a2008$lpcls <- NULL

round(cor(a2008$l5lpcls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lpcls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lpcls ))/nrow(a2008)*100
## N
a2008$l5lpcls <- NULL

round(cor(a2008$lpls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lpls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lpls ))/nrow(a2008)*100
## N
a2008$lpls <- NULL

round(cor(a2008$l5lpls , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lpls , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lpls ))/nrow(a2008)*100
## N
a2008$l5lpls <- NULL

round(cor(a2008$lsoverlp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lsoverlp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lsoverlp ))/nrow(a2008)*100
## N
a2008$lsoverlp <- NULL

round(cor(a2008$l5lsoverlp , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$l5lsoverlp , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$l5lsoverlp ))/nrow(a2008)*100
## N
a2008$l5lsoverlp <- NULL

round(cor(a2008$lprivedg , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lprivedg , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lprivedg ))/nrow(a2008)*100
## N
a2008$lprivedg <- NULL

round(cor(a2008$lprivedt , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lprivedt , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lprivedt ))/nrow(a2008)*100
## N
a2008$lprivedt <- NULL

round(cor(a2008$prived2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$prived2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$prived2 ))/nrow(a2008)*100
## N
a2008$prived2 <- NULL

round(cor(a2008$lprived2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lprived2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lprived2 ))/nrow(a2008)*100
## N
a2008$lsoverlp <- NULL

round(cor(a2008$lgovex2 , analysis, use = "pairwise.complete.obs"), 2)
round(cor(a2008$lgovex2 , missing, use = "pairwise.complete.obs"), 2)
sum(is.na(a2008$lgovex2 ))/nrow(a2008)*100
## N
a2008$lgovex2 <- NULL

## Imputation
head(a2008)
dim(a2008)

## What is average percentage of missing data?
NAs <- function(x) {
    as.vector(apply(x, 2, function(x) length(which(is.na(x)))))
    }
NAs(a2008)
mean(NAs(a2008)/nrow(a2008))*100

## Thus: 15 imputations

## Note: pubed, polity2, terprim, pctACFE are already lagged
set.seed(02138)
a2008.out <- amelia(a2008, m = 15, ts = "year", cs = "ccode", polytime = 3, empri = 0.01*nrow(a2008))

write.amelia(obj=a2008.out, file.stem = "A2008 IO Imp Data", format = "dta", separate = FALSE)

